﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Lhz.Pp.Entity.Database
{
    [DataContract(IsReference = true)]
    public class Organization : DatabaseEntity
    {
        [DataMember]
        public virtual string Name { get; set; }

        [DataMember]
        public virtual Guid? ParentGuid { get; set; }

        [DataMember]
        public virtual Organization Parent { get; set; }

        [DataMember]
        public virtual IList<Organization> Children { get; set; }

        [DataMember]
        public virtual IList<OrganizationManagement> SuperiorOrganizationManagements { get; set; }

        [DataMember]
        public virtual IList<OrganizationManagement> SubordinateOrganizationManagements { get; set; }

        [DataMember]
        public virtual IList<Region> Regions { get; set; }
    }
}
